l100/Hoofdstuk 6/Opdracht 6.4.php
<!DOCTYPE html>
<html lang="en">
<head>
<style>
table tr th{
border: 1px black solid;
}
td{
border: 1px black solid
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<table>
<tr>
<th>Cijfer </th>
<th>Kwadraat </th>
<th>Derde macht </th>
</tr>
<?php
for($x=0;$x<=100;$x++){
$kwadraat = $x*$x;
$derde = $x*$x*$x;
echo "<tr>";
echo "<td>$x</td>";
echo "<td>$kwadraat</td>";
echo "<td>$derde</td>";
echo "</tr>";
}
?>
</table>
<?php
/*for($x=0;$x<=100;$x++){
}*/
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse